<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>             <meta http-equiv="expires" content="0"></meta>             <meta http-equiv="Cache-Control" content="no-cache"></meta>             <meta http-equiv="Cache-Control" content="no-cache"></meta>
        <title>.:DMES:. - Insumos</title>
        <link rel="stylesheet" type="text/css" href="#{request.contextPath}/css/webStyle.css"/>
        <script type="text/javascript">
            function start() {
                PF('statusDialog').show();
            }

            function stop() {
                PF('statusDialog').hide();
            }
            
            window.setTimeout("inputInit()",1000);
        </script>
    </h:head>
    <h:body style="background-color: #000;">
        <p:ajaxStatus onstart="PF('statusDialog').show()" oncomplete="PF('statusDialog').hide()"/>
        <p:dialog modal="true" widgetVar="statusDialog" header="Cargando..." position="center top"
                  draggable="false" closable="false" resizable="false">
            <p:graphicImage value="/images/loadBar.gif"/>
        </p:dialog>
        <div>
            <p:growl autoUpdate="true" showDetail="true" life="8000" />
            <!--         Dialogo para guardar nuevos Insumos         -->
            <p:dialog id="dialogInputSave" widgetVar="dialogInputSave" draggable="true" 
                      closable="true"  header="Crear Insumos" position="center top" width="800"
                      hideEffect="explode" modal="true" showEffect="explode" resizable="true">

                <h:form id="formWizardSave" >

                    <p:wizard  flowListener="#{scInputBean.onFlowProcessSaveInput}" id="wizardSave" widgetVar="wizardSave" 
                               backLabel="Atras" nextLabel="Siguiente">
                        <p:tab title="Datos del Generales" id="tabGeneral" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para los datos básicos del insumo">
                            <p:panel header="Datos Básicos" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  value="Imagen"/>
                                        </td>
                                        <td width="40%" align="left" valign="middle">
                                            <h:graphicImage value="#{scInputBean.searchImage(scInputBean.inputSave)}" alt="Imagen no disponible" id="imageSave" 
                                                            width="120" height="120"  />
                                            <p:spacer width="5px"/>
                                            <p:commandButton  id="btnPicture" icon="ui-icon-image"  oncomplete="PF('pictureSave').show()" style="top: -10px;"
                                                              ignoreAutoUpdate="true"/>                                       
                                        </td>
                                        <td colspan="2" ></td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfNameInput" value="Nombre Insumo*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfNameInput"  value="#{scInputBean.inputSave.description}"
                                                            />

                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfExpiryDate" value="Fecha de Caducidad"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:calendar    id="tfExpiryDate"  value="#{scInputBean.inputSave.expiryDate}" autocomplete="true"
                                                           effect="explode" mask="true" pattern="dd/MM/yyyy"
                                                           />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfTypeMaterial" value="Tipo de Material*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfTypeMaterial"  value="#{scInputBean.inputSave.typeMaterial}" autocomplete="true"
                                                            requiredMessage="Debe ingresar el tipo de material" />
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfValueInput" value="Valor*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfValueInput"  value="#{scInputBean.inputSave.value}" 
                                                            requiredMessage="Debe ingresar el valor del insumo" style="width: 100px;">
                                                <p:tooltip for="" value="Valor correspondiente a la unidad de empaque"
                                            </p:inputText>
                                            <p:spacer width="5"/>
                                            <p:selectOneMenu id="cbMoney"  value="#{scInputBean.inputSave.money}" 
                                                             converter="moneyConverter" converterMessage="Error en el tipo de dato de la moneda" style="width: 100px; top: 6px;"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..."/>
                                                <f:selectItems value="#{scInputBean.moneyList}" var="money" itemLabel="#{money.acronym} #{money.description}"/>

                                            </p:selectOneMenu>
                                        </td>
                                    </tr> 
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfMarkInput" value="Marca*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfMarkInput"  value="#{scInputBean.inputSave.mark}"
                                                            requiredMessage="Campo obligatorio debe ingresar la marca del insumo"/>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfSerieInput" value="Serie*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfSerieInput"  value="#{scInputBean.inputSave.serie}"
                                                            />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbSupplier" value="Proveedor*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbSupplier"  value="#{scInputBean.inputSave.supplierGuarantee}" style="width: 70%;"
                                                             converter="partnerConverter" converterMessage="Error en el tipo de dato del proveedor y garantía"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..." />
                                                <f:selectItems value="#{scInputBean.partnersList}" var="partners" itemLabel="#{partners.companyName}"/>
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbCostCenter" value="Centro de Costos*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbCostCenter"  value="#{scInputBean.inputSave.costCenter}" style="width: 70%;" 
                                                             converter="costCenterConverter" converterMessage="Error en el tipo de dato del centro de costos"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..." />
                                                <f:selectItems  value="#{scInputBean.costCenterList}" var="costCenters" itemLabel="#{costCenters.description}"/>
                                            </p:selectOneMenu>
                                            <p:spacer width="5px"/>
                                            <p:commandButton  id="btnAddCostCenter" icon="ui-icon-circle-plus"  oncomplete="PF('centerCostSave').show()" style="top: -8px;"/>
                                            <p:tooltip for="btnAddCostCenter" value="Agregue nuevos centros de costos"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfStore" value="Almacén*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="tfStore"  value="#{scInputBean.inputSave.inputStock.idStore}" style="width: 70%;"
                                                             converter="storeConverter" converterMessage="Error en el tipo de dato del almacén"
                                                             effect="puff"
                                                             height="140" >
                                                <f:selectItem itemLabel="..." />
                                                <f:selectItems value="#{scInputBean.storesList}" var="stores" itemLabel="#{stores.name}"/>
                                                <p:ajax event="change" update="cbLocation,btnAddLocationInput" listener="#{scInputBean.withOutStore(scInputBean.inputSave.inputStock.idStore)}"/>
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbLocation" value="Localización*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbLocation"  value="#{scInputBean.inputSave.inputLocation}" style="width: 70%;" 
                                                             converter="inputLocationConverter" converterMessage="Error en el tipo de dato de la localización del insumo"
                                                             effect="puff" disabled="#{scInputBean.withOutStore(scInputBean.inputSave.inputStock.idStore)}"
                                                             height="140">
                                                <f:selectItem itemLabel="..." />
                                                <f:selectItems  value="#{scInputBean.inputLocationsList}" var="inputLocations" itemLabel="#{inputLocations.location}"/>
                                            </p:selectOneMenu>
                                            <p:spacer width="5px"/>
                                            <p:commandButton  id="btnAddLocationInput" icon="ui-icon-circle-plus"  oncomplete="PF('inputLocationSave').show()" style="top: -8px;"
                                                               disabled ="#{scInputBean.withOutStore(scInputBean.inputSave.inputStock.idStore)}"/>
                                            <p:tooltip for="btnAddLocationInput" value="Agregue nuevas localizaciones"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfProirity" value="Prioridad*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="tfProirity"  value="#{scInputBean.inputSave.priority}" style="width: 70%;"
                                                             converter="priorityConverter" converterMessage="Error en el tipo de dato de la prioridad"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..." />
                                                <f:selectItems value="#{scInputBean.priorityList}" var="priority" itemLabel="#{priority.name}"/>e
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbPackingUnit" value="Unidad de Empaque*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbPackingUnit"  value="#{scInputBean.inputSave.packingUnit}" 
                                                             converter="packingUnitConverter" converterMessage="Error en el tipo de dato de la unidad de empaque" style="width: 70%; top: 6px;"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..."/>
                                                <f:selectItems value="#{scInputBean.packingUnitsList}" var="units" itemLabel="#{units.acronym}"/>

                                            </p:selectOneMenu>
                                            <p:spacer width="5px"/>
                                            <p:commandButton  id="btnAddPackingUnit" icon="ui-icon-circle-plus"  oncomplete="PF('unitPackingSave').show()" style="top: -2px;"/>
                                            <p:tooltip for="btnAddPackingUnit" value="Agregue nuevas unidades de empaque"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfDistributionAmount" value="Cantidad de Distribución*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfDistributionAmount"  value="#{scInputBean.inputSave.distributionAmount}">
                                                <p:tooltip for="tfDistributionAmount" value="Cantidad de distribución por unidad de empaque, ejemplo
                                                           unidad de empaque = Caja, Cantidad de distribución 12 botellas"/>
                                            </p:inputText>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbDistributionUnit" value="Unidad de Distribución*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbDistributionUnit"  value="#{scInputBean.inputSave.distributionUnit}" 
                                                             converter="distributionUnitConverter" converterMessage="Error en el tipo de dato de la unidad de distribución" style="width: 70%; top: 6px;"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..."/>
                                                <f:selectItems value="#{scInputBean.distributionUnitsList}" var="units" itemLabel="#{units.acronym}"/>

                                            </p:selectOneMenu>
                                            <p:spacer width="5px"/>
                                            <p:commandButton  id="btnAddDistributionUnit" icon="ui-icon-circle-plus"  oncomplete="PF('unitDistributionSave').show()" style="top: -2px;"/>
                                            <p:tooltip for="btnAddDistributionUnit" value="Agregue nuevas unidades de distribución"/>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab> 
                        <!--                        finaliza la pestaña para datos generales -->

                        <!--                        inicia la pestaña para el stock y -->
                        <p:tab title="Stock y Dimensiones" id="tabStock" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para el stock">
                            <p:panel header="Stock" toggleable="true" toggleTitle="Presione para minimizar el panel de Stock">
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfMaximeStock" value="Stock Máximo*"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfMaximeStock"  value="#{scInputBean.inputSave.inputStock.maximeStock}"
                                                            />
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfMinimeStock" value="Stock Mínimo*"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfMinimeStock"  value="#{scInputBean.inputSave.inputStock.minimeStock}"
                                                            />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfCurrentStock" value="Stock Real*"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfCurrentStock"  value="#{scInputBean.inputSave.inputStock.currentStock}"
                                                            >
                                                <p:ajax event="keyup" update="tfValueTotal,tfTotalDistributionAmount,tfUnitPriceDistribution" listener="#{scInputBean.calcuteTotalPrice()}"/>
                                            </p:inputText>
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfOptimeStock" value="Stock Óptimo*"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfOptimeStock"  value="#{scInputBean.inputSave.inputStock.optimeStock}"
                                                            />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfPriceUnit" value="Precio por Und. de #{scInputBean.inputSave.packingUnit.acronym}"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfPriceUnit"  value="#{scInputBean.inputSave.inputStock.priceUnit} #{scInputBean.inputSave.money.acronym}" disabled="true"
                                                            />
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfValueTotal" value="Valor Total"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfValueTotal"  value="#{scInputBean.inputSave.inputStock.totalValue}  #{scInputBean.inputSave.money.acronym}" disabled="true"
                                                            />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfTotalDistributionAmount" 
                                            value="Total de #{scInputBean.inputSave.distributionUnit.acronym}"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfTotalDistributionAmount"  value="#{scInputBean.inputSave.totalAmountDistribution}" disabled="true"
                                                            />
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfUnitPriceDistribution" value="Precio por #{scInputBean.inputSave.distributionUnit.acronym}"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfUnitPriceDistribution"  value="#{scInputBean.inputSave.distributionValue} #{scInputBean.inputSave.money.acronym}" disabled="true"
                                                            />
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                            <p:panel header="Dimensiones" 
                                     id="pnlDimension">
                                <f:facet name="header">
                                    <p:outputLabel value="Dimensiones" style="text-align: center;"/>
                                </f:facet>
                                <f:facet name="header">
                                    <p:commandButton icon="ui-icon-plus" id="btnAddMeasure" style="float: right;"  
                                                     oncomplete="PF('measureSave').show()">
                                        <p:tooltip for="btnAddMeasure" value="Agregar una medida"/>
                                    </p:commandButton>
                                </f:facet>
                                <table width="98%" cellspacing="10"  >
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfHigh" value="Altura*"/>

                                        </td>
                                        <td width="40%" align="left">

                                            <p:inputText    id="tfHigh"  value="#{scInputBean.inputSave.dimension.hight}"
                                                            requiredMessage="Debe ingresar la altura" style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardSave:cbMeasureHigh" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureHigh"  value="#{scInputBean.measureUnitSaveHigh}" style="width: 60px; top: 6px;" 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             requiredMessage="Campo obligatorio debe seleccionar una medida" effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSave.dimension.hight, 1)}" >
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>


                                        </td> 
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfWidth" value="Ancho*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfWidth"  value="#{scInputBean.inputSave.dimension.width}"
                                                            requiredMessage="Debe ingresar el ancho" style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardSave:cbMeasureWidth" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureWidth"  value="#{scInputBean.measureUnitSaveWidth}" style="width: 60px; top: 6px;"
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             requiredMessage="Campo obligatorio debe seleccionar una medida" effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSave.dimension.width, 2)}">
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfLarge" value="Largo*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfLarge"  value="#{scInputBean.inputSave.dimension.large}"
                                                            requiredMessage="Debe ingresar el alto" style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardSave:cbMeasureLarge" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureLarge"  value="#{scInputBean.measureUnitSaveLarge}" style="width: 60px; top: 6px;" 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             requiredMessage="Campo obligatorio debe seleccionar una medida" effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSave.dimension.large, 3)}">
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfVolume" value="Volumen"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfVolume"  value="#{scInputBean.inputSave.dimension.volume}"
                                                            requiredMessage="Debe ingresar el volumen" style="width: 100px; ">
                                                <p:ajax event="keyup" update=":formWizardSave:cbMeasureVolume" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureVolume"  value="#{scInputBean.measureUnitSaveVolume}" style="width: 60px; top: 6px; " 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             requiredMessage="Campo obligatorio debe seleccionar una medida" effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSave.dimension.volume, 4)}"> 
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfThickness" value="Grosor"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfThickness"  value="#{scInputBean.inputSave.dimension.thickness}"
                                                            requiredMessage="Debe ingresar el grosor" style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardSave:cbMeasureThickness" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureThickness"  value="#{scInputBean.measureUnitSaveThickness}" style="width: 60px; top: 6px;" 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             requiredMessage="Campo obligatorio debe seleccionar una medida" effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSave.dimension.thickness, 5)}"> 
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfRadio" value="Radio"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfRadio"  value="#{scInputBean.inputSave.dimension.radio}"
                                                            requiredMessage="Debe ingresar el radio" style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardSave:cbMeasureRadio" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureRadio"  value="#{scInputBean.measureUnitSaveRadio}" style="width: 60px; top: 6px;" 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             required="true" requiredMessage="Campo obligatorio debe seleccionar una medida" effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSave.dimension.radio, 6)}">
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfWeight" value="Peso*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfWeight"  value="#{scInputBean.inputSave.dimension.weight}"
                                                            requiredMessage="Debe ingresar el peso" style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardSave:cbMeasureWeight" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureWeight"  value="#{scInputBean.measureUnitSaveWeight}" style="width: 60px; top: 6px;" 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             required="true" requiredMessage="Campo obligatorio debe seleccionar una medida" effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSave.dimension.weight, 7)}">
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfObservationsDimension" value="Observaciones"/>
                                        </td>
                                        <td  width="40%" align="left"> 
                                            <p:inputTextarea   id="tfObservationsDimension"  value="#{scInputBean.inputSave.dimension.observations}"
                                                               style="width: 98%;"     />
                                        </td>
                                    </tr>

                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para stock y dimensiones-->
                        <!--                        inicia pestaña para especificaciones-->
                        <p:tab title="Especificaciones" id="tabSpecifications" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para las especificaciones del insumo">
                            <p:panel header="Especificaciones" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="40%">
                                            <table width="100%" cellspacing="10">
                                                <tr>
                                                    <td width="40%" >
                                                        <p:outputLabel for="tfTittleSpecification" value="Título"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputText id="tfTittleSpecification" value="#{scInputBean.specificationsSave.tittle}"/>
                                                        <p:tooltip for="tfTittleSpecification" value="Ingrese el título de la especificacion a Realizar"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="40%">
                                                        <p:outputLabel for="tfSpecificationSave" value="Especificación"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputTextarea id="tfSpecificationSave" value="#{scInputBean.specificationsSave.description}"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <center>
                                                            <p:commandButton value="Guardar" update="tfTittleSpecification,tfSpecificationSave,dataTableSpecificationSave"
                                                                             actionListener="#{scInputBean.saveSpecification()}"/>
                                                        </center>
                                                    </td>
                                                </tr>

                                            </table>
                                        </td>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableSpecificationSave"
                                                         var="specifications" 
                                                         value="#{scInputBean.specificationListSave}"
                                                         rowKey="#{specifications.tittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{specifications.tittle}">
                                                <p:column  style="width:32px">
                                                    <p:commandButton icon="ui-icon-close" update="dataTableSpecificationSave" title="Eliminar Especificaciones"
                                                                     process="dataTableSpecificationSave" 
                                                                     actionListener="#{scInputBean.deleteSpecifications(specifications)}" >
                                                    </p:commandButton>
                                                </p:column>
                                                <p:column  headerText="Título" sortBy="#{specifications.tittle}">
                                                    <p:outputLabel value="#{specifications.tittle}" id="outTittle"/>
                                                    <p:tooltip value="#{specifications.tittle}" for="outTittle"/>
                                                </p:column>
                                                <p:column  headerText="Observación" sortBy="#{specifications.description}">
                                                    <p:outputLabel value="#{specifications.description}" id="outDescription"/>
                                                    <p:tooltip value="#{specifications.description}" for="outDescription"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para especificaciones-->
                        <!--                        inicia pestaña para características-->
                        <p:tab title="Características" id="tabFeactures" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para las características del insumo">
                            <p:panel header="Características" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="40%">
                                            <table width="100%" cellspacing="10">
                                                <tr>
                                                    <td width="40%" >
                                                        <p:outputLabel for="tfTittleFeacture" value="Título"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputText id="tfTittleFeacture" value="#{scInputBean.feacturesSave.tittle}"/>
                                                        <p:tooltip for="tfTittleFeacture" value="Ingrese el título de la especificacion a Realizar"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="40%">
                                                        <p:outputLabel for="tfFeactureSave" value="Característica"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputTextarea id="tfFeactureSave" value="#{scInputBean.feacturesSave.description}"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <center>
                                                            <p:commandButton value="Guardar" update="tfTittleFeacture,tfFeactureSave,dataTableFeactureSave"
                                                                             actionListener="#{scInputBean.saveFeacture()}"/>
                                                        </center>
                                                    </td>
                                                </tr>

                                            </table>
                                        </td>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableFeactureSave"
                                                         var="feactures" 
                                                         value="#{scInputBean.feacturesListSave}"
                                                         rowKey="#{feactures.tittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{feactures.tittle}">
                                                <p:column  style="width:32px">
                                                    <p:commandButton icon="ui-icon-close" update="dataTableFeactureSave" title="Eliminar Características"
                                                                     process="dataTableFeactureSave" 
                                                                     actionListener="#{scInputBean.deleteFeactures(feactures)}" >
                                                    </p:commandButton>
                                                </p:column>
                                                <p:column  headerText="Título" sortBy="#{feactures.tittle}">
                                                    <p:outputLabel value="#{feactures.tittle}" id="outTittle"/>
                                                    <p:tooltip value="#{feactures.tittle}" for="outTittle"/>
                                                </p:column>
                                                <p:column  headerText="Observación" sortBy="#{feactures.description}">
                                                    <p:outputLabel value="#{feactures.description}" id="outDescription"/>
                                                    <p:tooltip value="#{feactures.description}" for="outDescription"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para características-->
                        <!--                        inicia pestaña para observaciones-->
                        <p:tab title="Observaciones" id="tabObservations" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para las observaciones del insumo">
                            <p:panel header="Observaciones" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="40%">
                                            <table width="100%" cellspacing="10">
                                                <tr>
                                                    <td width="40%" >
                                                        <p:outputLabel for="tfTittleObservation" value="Título"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputText id="tfTittleObservation" value="#{scInputBean.observationsSave.tittle}"/>
                                                        <p:tooltip for="tfTittleObservation" value="Ingrese el título de la especificacion a Realizar"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="40%">
                                                        <p:outputLabel for="tfObservationSave" value="Observación"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputTextarea id="tfObservationSave" value="#{scInputBean.observationsSave.description}"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <center>
                                                            <p:commandButton value="Guardar" update="tfTittleObservation,tfObservationSave,dataTableObservationSave"
                                                                             actionListener="#{scInputBean.saveObservation()}"/>
                                                        </center>
                                                    </td>
                                                </tr>

                                            </table>
                                        </td>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableObservationSave"
                                                         var="observation" 
                                                         value="#{scInputBean.observationListSave}"
                                                         rowKey="#{observation.tittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{observation.tittle}">
                                                <p:column  style="width:32px">
                                                    <p:commandButton icon="ui-icon-close" update="dataTableObservationSave" title="Eliminar Observaciones"
                                                                     process="dataTableObservationSave" 
                                                                     actionListener="#{scInputBean.deleteObservation(observation)}" >
                                                    </p:commandButton>
                                                </p:column>
                                                <p:column  headerText="Título" sortBy="#{observation.tittle}">
                                                    <p:outputLabel value="#{observation.tittle}" id="outTittle"/>
                                                    <p:tooltip value="#{observation.tittle}" for="outTittle"/>
                                                </p:column>
                                                <p:column  headerText="Observación" sortBy="#{observation.description}">
                                                    <p:outputLabel value="#{observation.description}" id="outDescription"/>
                                                    <p:tooltip value="#{observation.description}" for="outDescription"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para observaciones-->
                        <!--                        inicia pestaña para documentos-->
                        <p:tab title="Documentos" id="tabDocuments" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para los documentos del insumo">
                            <p:panel header="Documentos" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableDocumentationSave"
                                                         var="document" 
                                                         value="#{scInputBean.documentsListSave}"
                                                         rowKey="#{document.documentTittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{document.documentTittle}">

                                                <f:facet name="header">
                                                    <p:commandButton icon="ui-icon-plus" id="btnAdd" style="float: right;"  
                                                                     oncomplete="PF('documentSave').show()">
                                                        <p:tooltip for="btnAdd" value="Agregar un Documento"/>
                                                    </p:commandButton>
                                                </f:facet>
                                                <p:column  style="width:32px">
                                                    <p:commandButton icon="ui-icon-close" update="dataTableDocumentationSave" title="Eliminar Documentos"
                                                                     process="@this" 
                                                                     actionListener="#{scInputBean.deleteDocument(document)}" >
                                                    </p:commandButton>
                                                </p:column>
                                                <p:column  headerText="Título" sortBy="#{document.documentTittle}">
                                                    <p:outputLabel value="#{document.documentTittle}" id="outTittle"/>
                                                    <p:tooltip value="#{document.documentTittle}" for="outTittle"/>
                                                </p:column>                                                 
                                                <p:column  headerText="Documento" sortBy="#{document.documentName}">
                                                    <p:outputLabel value="#{document.documentName}" id="documentName"/>
                                                    <p:tooltip value="#{document.documentName}" for="documentName"/>
                                                </p:column>
                                                <p:column  headerText="Fecha de Subida" sortBy="#{scInputBean.getFormatDateGlobal('dd/MM/yyyy hh:mm:ss', document.creationDate)}">
                                                    <p:outputLabel value="#{scInputBean.getFormatDateGlobal('dd/MM/yyyy hh:mm:ss', document.creationDate)}" id="uploadDate"/>
                                                    <p:tooltip value="#{scInputBean.getFormatDateGlobal('dd/MM/yyyy hh:mm:ss', document.creationDate)}" for="uploadDate"/>
                                                </p:column>
                                                <p:column  headerText="Subido por" sortBy="#{document.uploadBy}">
                                                    <p:outputLabel value="#{document.uploadBy}" id="uploadBy"/>
                                                    <p:tooltip value="#{document.uploadBy}" for="uploadBy"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para documentos                         -->
                        <!--        inicia la pestaña para confirmar datos de guardar-->
                        <p:tab title="Confirmar datos" id="tabConfirmSave" titleStyleClass="tabTittleSavePerson"
                               titletip="Pestaña para confirmar los datos del insumo a crear">
                            <p:panel header="Crear Insumo" style="text-align: center;">
                                <table width="98%" cellspacing="10" style="text-align: center;">
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfNameInputSave" value="Nombre Insumo"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfNameInputSave"  value="#{scInputBean.inputSave.description}"/>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfExpiryDateSave" value="Fecha de Caducidad"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfExpiryDateSave"  value="#{scInputBean.inputSave.expiryDate}"
                                                              />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfTypeMaterialSave" value="Tipo de Material"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfTypeMaterialSave"  value="#{scInputBean.inputSave.typeMaterial}"/>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfValueInputSave" value="Valor"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfValueInputSave"  value="#{scInputBean.inputSave.value}"/>
                                        </td>
                                    </tr> 
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfMarkInputSave" value="Marca"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfMarkInputSave"  value="#{scInputBean.inputSave.mark}"
                                                              />
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfSerieInputSave" value="Serie"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfSerieInputSave"  value="#{scInputBean.inputSave.serie}"
                                                              />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="98%" colspan="2">
                                            <p:commandButton id="btnSaveInput" value="Guardar Insumo" onsuccess="PF('dialogInputSave').hide()"
                                                             actionListener="#{scInputBean.saveInput()}" update=":formInput:scDataTableInputs,:formWizardSave"
                                                             oncomplete="PF('wizardSave').loadStep('tabGeneral', false)"/>
                                            <p:spacer width="30"/>
                                            <p:commandButton id="btnCancelPartner" value="Cancelar" oncomplete="PF('dialogInputSave').hide();PF('wizardSave').loadStep('tabGeneral', false)"
                                                             actionListener="#{scInputBean.cleanInputSave()}" update=":formInput:scDataTableInputs,:formWizardSave"/>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>

                        </p:tab>
                        <!--        finaliza la pestaña para confirmar datos de guardar-->
                    </p:wizard>
                </h:form>
                <p:ajax event="close" oncomplete="PF('wizardSave').loadStep('tabGeneral', true)" listener="#{scInputBean.cleanInputSave()}" update=":formInput:scDataTableInputs,:formWizardSave"/>
            </p:dialog>
            <!--         finaliza el dialogo para guardar Insumos               -->






            <!--###########inicia el dialogo para actualizar insumos#############-->
            <p:dialog id="dialogInputUpdate" widgetVar="dialogInputUpdate" draggable="true" 
                      closable="true"  header="Actualizar Insumos" position="center top" width="800"
                      hideEffect="explode" modal="true" showEffect="explode" resizable="true">

                <h:form id="formWizardUpdate" >

                    <p:wizard  flowListener="#{scInputBean.onFlowProcessUpdateInput}" id="wizardUpdate" widgetVar="wizardUpdate" 
                               backLabel="Atras" nextLabel="Siguiente">
                        <p:tab title="Datos del Generales" id="tabGeneral" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para los datos básicos del insumo">
                            <p:panel header="Datos Básicos" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  value="Imagen"/>
                                        </td>
                                        <td width="40%" align="left" valign="middle">
                                            <h:graphicImage value="#{scInputBean.searchImage(scInputBean.inputSelected)}" alt="Imagen no disponible" id="imageUpdate" 
                                                            width="120" height="120"  />
                                            <p:spacer width="5px"/>
                                            <p:commandButton  id="btnPicture" icon="ui-icon-image"  oncomplete="PF('pictureUpdate').show()" style="top: -10px;"
                                                              ignoreAutoUpdate="true"/>                                       
                                        </td>
                                        <td colspan="2" ></td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfNameInput" value="Nombre Insumo*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfNameInput"  value="#{scInputBean.inputSelected.description}"
                                                            />
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfExpiryDate" value="Fecha de Caducidad"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:calendar    id="tfExpiryDate"  value="#{scInputBean.inputSelected.expiryDate}" autocomplete="true"
                                                           effect="explode" mask="true" pattern="dd/MM/yyyy" 
                                                           />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfTypeMaterial" value="Tipo de Material*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfTypeMaterial"  value="#{scInputBean.inputSelected.typeMaterial}" autocomplete="true"
                                                            />
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfValueInput" value="Valor*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfValueInput"  value="#{scInputBean.inputSelected.value}" style="width: 100px;"/>
                                            <p:spacer width="5"/>
                                            <p:selectOneMenu id="cbMoney"  value="#{scInputBean.inputSelected.money}" 
                                                             converter="moneyConverter" converterMessage="Error en el tipo de dato de la moneda" style="width: 100px; top: 6px;"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..."/>
                                                <f:selectItems value="#{scInputBean.moneyList}" var="money" itemLabel="#{money.acronym} #{money.description}"/>

                                            </p:selectOneMenu>
                                        </td>
                                    </tr> 
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfMarkInput" value="Marca*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfMarkInput"  value="#{scInputBean.inputSelected.mark}"
                                                            />
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfSerieInput" value="Serie*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfSerieInput"  value="#{scInputBean.inputSelected.serie}"
                                                            />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbSupplier" value="Proveedor*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbSupplier"  value="#{scInputBean.inputSelected.supplierGuarantee}" style="width: 70%;"
                                                             converter="partnerConverter" converterMessage="Error en el tipo de dato del proveedor y garantía"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..." />
                                                <f:selectItems value="#{scInputBean.partnersList}" var="partners" itemLabel="#{partners.companyName}"/>
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbCostCenter" value="Centro de Costos*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbCostCenter"  value="#{scInputBean.inputSelected.costCenter}" style="width: 70%;" 
                                                             converter="costCenterConverter" converterMessage="Error en el tipo de dato del centro de costos"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..." />
                                                <f:selectItems  value="#{scInputBean.costCenterList}" var="costCenters" itemLabel="#{costCenters.description}"/>
                                            </p:selectOneMenu>
                                            <p:spacer width="5px"/>
                                            <p:commandButton  id="btnAddCostCenter" icon="ui-icon-circle-plus"  oncomplete="PF('centerCostSave').show()" style="top: -8px;"/>
                                            <p:tooltip for="btnAddCostCenter" value="Agregue nuevos centros de costos"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfStore" value="Almacén*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="tfStore"  value="#{scInputBean.inputSelected.inputStock.idStore}" style="width: 70%;"
                                                             converter="storeConverter" converterMessage="Error en el tipo de dato del almacén"
                                                             effect="puff"
                                                             height="140" >
                                                <f:selectItem itemLabel="..." />
                                                <f:selectItems value="#{scInputBean.storesList}" var="stores" itemLabel="#{stores.name}"/>
                                                <p:ajax event="change" update="cbLocation,btnAddLocationInput" listener="#{scInputBean.withOutStore(scInputBean.inputSelected.inputStock.idStore)}"/>
                                            </p:selectOneMenu>
                                        </td>
                                        
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbLocation" value="Localización*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbLocation"  value="#{scInputBean.inputSelected.inputLocation}" style="width: 70%;" 
                                                             converter="inputLocationConverter" converterMessage="Error en el tipo de dato de la localización del insumo"
                                                             effect="puff" disabled="#{scInputBean.withOutStore(scInputBean.inputSelected.inputStock.idStore)}"
                                                             height="140">
                                                <f:selectItem itemLabel="..." />
                                                <f:selectItems  value="#{scInputBean.inputLocationsList}" var="inputLocations" itemLabel="#{inputLocations.location}"/>
                                            </p:selectOneMenu>
                                            <p:spacer width="5px"/>
                                            <p:commandButton  id="btnAddLocationInput" icon="ui-icon-circle-plus"  oncomplete="PF('inputLocationSave').show()" style="top: -8px;"
                                                              disabled="#{scInputBean.withOutStore(scInputBean.inputSelected.inputStock.idStore)}"/>
                                            <p:tooltip for="btnAddLocationInput" value="Agregue nuevas localizaciones"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfProirity" value="Prioridad*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="tfProirity"  value="#{scInputBean.inputSelected.priority}" style="width: 70%;"
                                                             converter="priorityConverter" converterMessage="Error en el tipo de dato de la prioridad"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..." />
                                                <f:selectItems value="#{scInputBean.priorityList}" var="priority" itemLabel="#{priority.name}"/>e
                                            </p:selectOneMenu>
                                        </td>
                                        
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbPackingUnit" value="Unidad de Empaque*"/>
                                        </td>
                                        <td width="40%" align="left">

                                            <p:selectOneMenu id="cbPackingUnit"  value="#{scInputBean.inputSelected.packingUnit}" 
                                                             converter="packingUnitConverter" converterMessage="Error en el tipo de dato de la unidad de empaque" style="width: 70%; top: 6px;"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..."/>
                                                <f:selectItems value="#{scInputBean.packingUnitsList}" var="units" itemLabel="#{units.acronym}"/>

                                            </p:selectOneMenu>
                                            <p:spacer width="5px"/>
                                            <p:commandButton  id="btnAddPackingUnit" icon="ui-icon-circle-plus"  oncomplete="PF('unitPackingSave').show()" style="top: -2px;"/>
                                            <p:tooltip for="btnAddPackingUnit" value="Agregue nuevas unidades de empaque"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfDistributionAmount" value="Cantidad de Distribución*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfDistributionAmount"  value="#{scInputBean.inputSelected.distributionAmount}">
                                                <p:tooltip for="tfDistributionAmount" value="Cantidad de distribución por unidad de empaque, ejemplo
                                                           unidad de empaque = Caja, Cantidad de distribución 12 botellas"/>
                                            </p:inputText>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbDistributionUnit" value="Unidad de Distribución*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbDistributionUnit"  value="#{scInputBean.inputSelected.distributionUnit}" 
                                                             converter="distributionUnitConverter" converterMessage="Error en el tipo de dato de la unidad de distribución" style="width: 70%; top: 6px;"
                                                             effect="puff"
                                                             height="140">
                                                <f:selectItem itemLabel="..."/>
                                                <f:selectItems value="#{scInputBean.distributionUnitsList}" var="units" itemLabel="#{units.acronym}"/>

                                            </p:selectOneMenu>
                                            <p:spacer width="5px"/>
                                            <p:commandButton  id="btnAddDistributionUnit" icon="ui-icon-circle-plus"  oncomplete="PF('unitDistributionSave').show()" style="top: -2px;"/>
                                            <p:tooltip for="btnAddDistributionUnit" value="Agregue nuevas unidades de distribución"/>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab> 
                        <!--                        finaliza la pestaña para datos generales -->
                        <!--                       inicia la pestaña para el stock y -->
                        <p:tab title="Stock y Dimensiones" id="tabStock" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para el stock">
                            <p:panel header="Stock" toggleable="true" toggleTitle="Presione para minimizar el panel de Stock">
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfMaximeStock" value="Stock Máximo"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfMaximeStock"  value="#{scInputBean.inputSelected.inputStock.maximeStock}"
                                                            />
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfMinimeStock" value="Stock Mínimo"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfMinimeStock"  value="#{scInputBean.inputSelected.inputStock.minimeStock}"
                                                            />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfCurrentStock" value="Stock Real"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfCurrentStock"  value="#{scInputBean.inputSelected.inputStock.currentStock}">
                                                <p:ajax event="keyup" update="tfValueTotal,tfTotalDistributionAmount,tfUnitPriceDistribution" listener="#{scInputBean.calcuteTotalPriceUpdate()}"/>
                                            </p:inputText>
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfOptimeStock" value="Stock Óptimo"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfOptimeStock"  value="#{scInputBean.inputSelected.inputStock.optimeStock}"
                                                            />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfPriceUnit" value="Precio por #{scInputBean.inputSelected.packingUnit.acronym}*" />
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfPriceUnit"  value="#{scInputBean.inputSelected.inputStock.priceUnit}  #{scInputBean.inputSelected.money.acronym}" disabled="true"
                                                            />
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfValueTotal" value="Valor Total" />
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfValueTotal"  value="#{scInputBean.inputSelected.inputStock.totalValue}  #{scInputBean.inputSelected.money.acronym}" disabled="true"
                                                            />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfTotalDistributionAmount" 
                                            value="Total de #{scInputBean.inputSelected.distributionUnit.acronym}"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfTotalDistributionAmount"  value="#{scInputBean.inputSelected.totalAmountDistribution}" disabled="true"
                                                            />
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfUnitPriceDistribution" value="Precio por #{scInputBean.inputSelected.distributionUnit.acronym}"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:inputText    id="tfUnitPriceDistribution"  value="#{scInputBean.inputSelected.distributionValue} #{scInputBean.inputSelected.money.acronym}" disabled="true"
                                                            />
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                            <p:panel header="Dimensiones" 
                                     id="pnlDimension">
                                <f:facet name="header">
                                    <p:outputLabel value="Dimensiones" style="text-align: center;"/>
                                </f:facet>
                                <f:facet name="header">
                                    <p:commandButton icon="ui-icon-plus" id="btnAddMeasure" style="float: right;"  
                                                     oncomplete="PF('measureSave').show()">
                                        <p:tooltip for="btnAddMeasure" value="Agregar una medida"/>
                                    </p:commandButton>
                                </f:facet>
                                <table width="98%" cellspacing="10"  >
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfHigh" value="Altura*"/>

                                        </td>
                                        <td width="40%" align="left">

                                            <p:inputText    id="tfHigh"  value="#{scInputBean.inputSelected.dimension.hight}"
                                                            style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardUpdate:cbMeasureHigh" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureHigh"  value="#{scInputBean.measureUnitSaveHigh}" style="width: 60px; top: 6px;" 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSelected.dimension.hight, 1)}" >
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>


                                        </td> 
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfWidth" value="Ancho*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfWidth"  value="#{scInputBean.inputSelected.dimension.width}"
                                                            style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardUpdate:cbMeasureWidth" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureWidth"  value="#{scInputBean.measureUnitSaveWidth}" style="width: 60px; top: 6px;"
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSelected.dimension.width, 2)}">
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfLarge" value="Largo*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfLarge"  value="#{scInputBean.inputSelected.dimension.large}"
                                                            style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardUpdate:cbMeasureLarge" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureLarge"  value="#{scInputBean.measureUnitSaveLarge}" style="width: 60px; top: 6px;" 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSelected.dimension.large, 3)}">
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfVolume" value="Volumen"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfVolume"  value="#{scInputBean.inputSelected.dimension.volume}"
                                                            style="width: 100px; ">
                                                <p:ajax event="keyup" update=":formWizardUpdate:cbMeasureVolume" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureVolume"  value="#{scInputBean.measureUnitSaveVolume}" style="width: 60px; top: 6px; " 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSelected.dimension.volume, 4)}"> 
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfThickness" value="Grosor"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfThickness"  value="#{scInputBean.inputSelected.dimension.thickness}"
                                                            style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardUpdate:cbMeasureThickness" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureThickness"  value="#{scInputBean.measureUnitSaveThickness}" style="width: 60px; top: 6px;" 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSelected.dimension.thickness, 5)}"> 
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfRadio" value="Radio"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfRadio"  value="#{scInputBean.inputSelected.dimension.radio}"
                                                            style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardUpdate:cbMeasureRadio" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureRadio"  value="#{scInputBean.measureUnitSaveRadio}" style="width: 60px; top: 6px;" 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSelected.dimension.radio, 6)}">
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfWeight" value="Peso*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputText    id="tfWeight"  value="#{scInputBean.inputSelected.dimension.weight}"
                                                            requiredMessage="Debe ingresar el peso" style="width: 100px;">
                                                <p:ajax event="keyup" update=":formWizardUpdate:cbMeasureWeight" />
                                            </p:inputText>
                                            <p:spacer width="5px"/>
                                            <p:selectOneMenu id="cbMeasureWeight"  value="#{scInputBean.measureUnitSaveWeight}" style="width: 60px; top: 6px;" 
                                                             converter="measureConverter" converterMessage="Error en el tipo de dato de la medida"
                                                             effect="puff"
                                                             height="140" disabled="#{!scInputBean.showItem(scInputBean.inputSelected.dimension.weight, 7)}">
                                                <f:selectItem itemLabel="Und." />
                                                <f:selectItems  value="#{scInputBean.measureUnitsList}" var="measure" itemLabel="#{measure.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfObservationsDimension" value="Observaciones"/>
                                        </td>
                                        <td  width="40%" align="left"> 
                                            <p:inputTextarea   id="tfObservationsDimension"  value="#{scInputBean.inputSelected.dimension.observations}"
                                                               style="width: 98%;"     />
                                        </td>
                                    </tr>

                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para stock y dimensiones-->
                        <!--                        inicia pestaña para especificaciones-->
                        <p:tab title="Especificaciones" id="tabSpecifications" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para las especificaciones del insumo">
                            <p:panel header="Especificaciones" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="40%">
                                            <table width="100%" cellspacing="10">
                                                <tr>
                                                    <td width="40%" >
                                                        <p:outputLabel for="tfTittleSpecification" value="Título"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputText id="tfTittleSpecification" value="#{scInputBean.specificationsSave.tittle}"/>
                                                        <p:tooltip for="tfTittleSpecification" value="Ingrese el título de la especificacion a Realizar"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="40%">
                                                        <p:outputLabel for="tfSpecificationSave" value="Especificación"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputTextarea id="tfSpecificationSave" value="#{scInputBean.specificationsSave.description}"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <center>
                                                            <p:commandButton value="Guardar" update="tfTittleSpecification,tfSpecificationSave,dataTableSpecificationSave"
                                                                             actionListener="#{scInputBean.updateSpecification()}"/>
                                                        </center>
                                                    </td>
                                                </tr>

                                            </table>
                                        </td>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableSpecificationSave"
                                                         var="specifications" 
                                                         value="#{scInputBean.inputSelected.scInputSpecifications}"
                                                         rowKey="#{specifications.tittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{specifications.tittle}">
                                                <p:column  style="width:32px">
                                                    <p:commandButton icon="ui-icon-close" update="dataTableSpecificationSave" title="Eliminar Especificaciones"
                                                                     process="dataTableSpecificationSave" 
                                                                     actionListener="#{scInputBean.deleteUpdateSpecifications(specifications)}" >
                                                    </p:commandButton>
                                                </p:column>
                                                <p:column  headerText="Título" sortBy="#{specifications.tittle}">
                                                    <p:outputLabel value="#{specifications.tittle}" id="outTittle"/>
                                                    <p:tooltip value="#{specifications.tittle}" for="outTittle"/>
                                                </p:column>
                                                <p:column  headerText="Observación" sortBy="#{specifications.description}">
                                                    <p:outputLabel value="#{specifications.description}" id="outDescription"/>
                                                    <p:tooltip value="#{specifications.description}" for="outDescription"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para especificaciones-->
                        <!--                        inicia pestaña para características-->
                        <p:tab title="Características" id="tabFeactures" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para las características del insumo">
                            <p:panel header="Características" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="40%">
                                            <table width="100%" cellspacing="10">
                                                <tr>
                                                    <td width="40%" >
                                                        <p:outputLabel for="tfTittleFeacture" value="Título"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputText id="tfTittleFeacture" value="#{scInputBean.feacturesSave.tittle}"/>
                                                        <p:tooltip for="tfTittleFeacture" value="Ingrese el título de la especificacion a Realizar"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="40%">
                                                        <p:outputLabel for="tfFeactureSave" value="Característica"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputTextarea id="tfFeactureSave" value="#{scInputBean.feacturesSave.description}"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <center>
                                                            <p:commandButton value="Guardar" update="tfTittleFeacture,tfFeactureSave,dataTableFeactureSave"
                                                                             actionListener="#{scInputBean.updateFeacture()}"/>
                                                        </center>
                                                    </td>
                                                </tr>

                                            </table>
                                        </td>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableFeactureSave"
                                                         var="feactures" 
                                                         value="#{scInputBean.inputSelected.scInputFeacturesList}"
                                                         rowKey="#{feactures.tittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{feactures.tittle}">
                                                <p:column  style="width:32px">
                                                    <p:commandButton icon="ui-icon-close" update="dataTableFeactureSave" title="Eliminar Características"
                                                                     process="dataTableFeactureSave" 
                                                                     actionListener="#{scInputBean.deleteUpdateFeactures(feactures)}" >
                                                    </p:commandButton>
                                                </p:column>
                                                <p:column  headerText="Título" sortBy="#{feactures.tittle}">
                                                    <p:outputLabel value="#{feactures.tittle}" id="outTittle"/>
                                                    <p:tooltip value="#{feactures.tittle}" for="outTittle"/>
                                                </p:column>
                                                <p:column  headerText="Observación" sortBy="#{feactures.description}">
                                                    <p:outputLabel value="#{feactures.description}" id="outDescription"/>
                                                    <p:tooltip value="#{feactures.description}" for="outDescription"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para características-->
                        <!--                        inicia pestaña para observaciones-->
                        <p:tab title="Observaciones" id="tabObservations" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para las observaciones del insumo">
                            <p:panel header="Observaciones" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="40%">
                                            <table width="100%" cellspacing="10">
                                                <tr>
                                                    <td width="40%" >
                                                        <p:outputLabel for="tfTittleObservation" value="Título"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputText id="tfTittleObservation" value="#{scInputBean.observationsSave.tittle}"/>
                                                        <p:tooltip for="tfTittleObservation" value="Ingrese el título de la especificacion a Realizar"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="40%">
                                                        <p:outputLabel for="tfObservationSave" value="Observación"/>
                                                    </td>
                                                    <td width="60%">
                                                        <p:inputTextarea id="tfObservationSave" value="#{scInputBean.observationsSave.description}"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <center>
                                                            <p:commandButton value="Guardar" update="tfTittleObservation,tfObservationSave,dataTableObservationSave"
                                                                             actionListener="#{scInputBean.updateObservation()}"/>
                                                        </center>
                                                    </td>
                                                </tr>

                                            </table>
                                        </td>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableObservationSave"
                                                         var="observation" 
                                                         value="#{scInputBean.inputSelected.scInputObservationsList}"
                                                         rowKey="#{observation.tittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{observation.tittle}">
                                                <p:column  style="width:32px">
                                                    <p:commandButton icon="ui-icon-close" update="dataTableObservationSave" title="Eliminar Observaciones"
                                                                     process="dataTableObservationSave" 
                                                                     actionListener="#{scInputBean.deleteUpdateObservation(observation)}" >
                                                    </p:commandButton>
                                                </p:column>
                                                <p:column  headerText="Título" sortBy="#{observation.tittle}">
                                                    <p:outputLabel value="#{observation.tittle}" id="outTittle"/>
                                                    <p:tooltip value="#{observation.tittle}" for="outTittle"/>
                                                </p:column>
                                                <p:column  headerText="Observación" sortBy="#{observation.description}">
                                                    <p:outputLabel value="#{observation.description}" id="outDescription"/>
                                                    <p:tooltip value="#{observation.description}" for="outDescription"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para observaciones-->

                        <!--                        inicia pestaña para documentos-->
                        <p:tab title="Documentos" id="tabDocuments" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para los documentos del insumo">
                            <p:panel header="Documentos" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableDocumentationSave"
                                                         var="document" 
                                                         value="#{scInputBean.inputSelected.scInputDocuments}"
                                                         rowKey="#{document.documentTittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{document.documentTittle}">

                                                <f:facet name="header">
                                                    <p:commandButton icon="ui-icon-plus" id="btnAdd" style="float: right;"  
                                                                     oncomplete="PF('documentUpdate').show()">
                                                        <p:tooltip for="btnAdd" value="Agregar un Documento"/>
                                                    </p:commandButton>
                                                </f:facet>
                                                <p:column  style="width:32px">
                                                    <p:commandButton icon="ui-icon-close" update="dataTableDocumentationSave" title="Eliminar Documentos"
                                                                     process="@this" 
                                                                     actionListener="#{scInputBean.deleteDocumentUpdate(document)}" >
                                                    </p:commandButton>
                                                </p:column>
                                                <p:column  headerText="Título" sortBy="#{document.documentTittle}">
                                                    <p:outputLabel value="#{document.documentTittle}" id="outTittle"/>
                                                    <p:tooltip value="#{document.documentTittle}" for="outTittle"/>
                                                </p:column>                                                 
                                                <p:column  headerText="Documento" sortBy="#{document.documentName}">
                                                    <p:outputLabel value="#{document.documentName}" id="documentName"/>
                                                    <p:tooltip value="#{document.documentName}" for="documentName"/>
                                                </p:column>
                                                <p:column  headerText="Fecha de Subida" sortBy="#{scInputBean.getFormatDateGlobal('dd/MM/yyyy hh:mm:ss', document.creationDate)}">
                                                    <p:outputLabel value="#{scInputBean.getFormatDateGlobal('dd/MM/yyyy hh:mm:ss', document.creationDate)}" id="uploadDate"/>
                                                    <p:tooltip value="#{scInputBean.getFormatDateGlobal('dd/MM/yyyy hh:mm:ss', document.creationDate)}" for="uploadDate"/>
                                                </p:column>
                                                <p:column  headerText="Subido por" sortBy="#{document.uploadBy}">
                                                    <p:outputLabel value="#{document.uploadBy}" id="uploadBy"/>
                                                    <p:tooltip value="#{document.uploadBy}" for="uploadBy"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para documentos
                        -->

                        <!--        inicia la pestaña para confirmar datos de guardar-->
                        <p:tab title="Confirmar datos" id="tabConfirmSave" titleStyleClass="tabTittleSavePerson"
                               titletip="Pestaña para confirmar los datos del insumo a crear">
                            <p:panel header="Actualizar Insumo" style="text-align: center;">
                                <table width="98%" cellspacing="10" style="text-align: center;">
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfNameInputSave" value="Nombre Insumo"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfNameInputSave"  value="#{scInputBean.inputSelected.description}"/>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfExpiryDateSave" value="Fecha de Caducidad"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfExpiryDateSave"  value="#{scInputBean.inputSelected.expiryDate}"
                                                              />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfTypeMaterialSave" value="Tipo de Material"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfTypeMaterialSave"  value="#{scInputBean.inputSelected.typeMaterial}"/>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfValueInputSave" value="Valor"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfValueInputSave"  value="#{scInputBean.inputSelected.value}"/>
                                        </td>
                                    </tr> 
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfMarkInputSave" value="Marca"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfMarkInputSave"  value="#{scInputBean.inputSelected.mark}"
                                                              />
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfSerieInputSave" value="Serie"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfSerieInputSave"  value="#{scInputBean.inputSelected.serie}"
                                                              />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="98%" colspan="2">
                                            <p:commandButton id="btnSaveInput" value="Guardar Insumo" onsuccess="PF('dialogInputUpdate').hide()"
                                                             actionListener="#{scInputBean.updateInput()}" update=":formInput:scDataTableInputs,:formWizardUpdate"
                                                             oncomplete="PF('wizardUpdate').loadStep('tabGeneral', false)"/>
                                            <p:spacer width="30"/>
                                            <p:commandButton id="btnCancelPartner" value="Cancelar" oncomplete="PF('dialogInputUpdate').hide();PF('wizardUpdate').loadStep('tabGeneral', false)"
                                                             actionListener="#{scInputBean.joinColumnsUpdate()}" update=":formInput:scDataTableInputs,:formWizardUpdate"/>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>

                        </p:tab>
                        <!--        finaliza la pestaña para confirmar datos de actualzar-->
                    </p:wizard>
                </h:form>
                <p:ajax event="close" oncomplete="PF('wizardUpdate').loadStep('tabGeneral', true)" 
                        update=":formInput:scDataTableInputs,:formWizardUpdate" listener="#{scInputBean.joinColumnsUpdate()}"/>
            </p:dialog>
            <!--################ finaliza el dialogo para actualizar Insumos #########################-->


            <!--             inicia el dialogo para eliminar registros           -->
            <p:dialog id="dialogInputDelete" widgetVar="dialogInputDelete" position="center top" 
                      closable="true" draggable="true" dynamic="true" header="Eliminar Proveedores"
                      hideEffect="explode" modal="true" showEffect="explode" resizable="false">
                <h:form id="formWizardDelete">
                    <table width="100%" cellspacing="30" style="padding: 0px; margin: 0px;">
                        <tr>
                            <td>
                                <p:outputLabel value="¿Desea eliminar el insumo
                                               #{scInputBean.inputSelected.description}?" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" align="center">
                                <p:commandButton value="Eliminar" actionListener="#{scInputBean.deleteInput()}"  
                                                 onsuccess="PF('dialogInputDelete').hide()"
                                                 update="@this,:formInput:scDataTableInputs"/>
                                <p:spacer width="20"/>

                                <p:commandButton value="Cancelar" oncomplete="PF('dialogInputDelete').hide()"
                                                 update="@this,:formInput:scDataTableInputs" actionListener="#{scInputBean.cleanInputSave()}" />
                            </td>
                        </tr>
                    </table>
                </h:form>

            </p:dialog>
            <!--            finaliza el dialogo para eliminar registros            -->

            <!--###########inicia el dialogo para visualizar insumos#############-->
            <p:dialog id="dialogInputView" widgetVar="dialogInputView" draggable="true" 
                      closable="true"  header="Visualizar Insumos" position="center top" width="800"
                      hideEffect="explode" modal="false" showEffect="explode" >

                <h:form id="formWizardView" >

                    <p:wizard  flowListener="#{scInputBean.onFlowProcessViewInput}" id="wizardUpdate" widgetVar="wizardView" 
                               backLabel="Atras" nextLabel="Siguiente">
                        <p:tab title="Datos del Generales" id="tabGeneral" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para los datos básicos del insumo">
                            <p:panel header="Datos Básicos" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  value="Imagen"/>
                                        </td>
                                        <td width="40%" align="left" valign="middle">
                                            <h:graphicImage value="#{scInputBean.searchImage(scInputBean.inputSelected)}" alt="Imagen no disponible" id="imageUpdate" 
                                                            width="120" height="120"  />                                            
                                        </td>
                                        <td colspan="2" ></td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfNameInput" value="Nombre Insumo"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfNameInput"  value="#{scInputBean.inputSelected.description}"/>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfExpiryDate" value="Fecha de Caducidad"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:calendar    id="tfExpiryDate"  value="#{scInputBean.inputSelected.expiryDate}"
                                                           effect="explode" mask="true" pattern="dd/MM/yyyy" disabled="true"    />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfTypeMaterial" value="Tipo de Material"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfTypeMaterial"  value="#{scInputBean.inputSelected.typeMaterial}"/>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfValueInput" value="Valor"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfValueInput"  value="#{scInputBean.inputSelected.value}" style="width: 100px;"/>
                                            <p:spacer width="5"/>
                                            <p:selectOneMenu id="cbMoney"  value="#{scInputBean.inputSelected.money}" 
                                                             converter="moneyConverter" converterMessage="Error en el tipo de dato de la moneda" style="width: 100px; top: 6px;"
                                                             effect="puff" disabled="true" 
                                                             height="140">
                                                <f:selectItem itemLabel="..."/>
                                                <f:selectItems value="#{scInputBean.moneyList}" var="money" itemLabel="#{money.acronym} #{money.description}"/>
                                                <p:tooltip for="cbMoney" value="#{scInputBean.inputSave.money.acronym} #{scInputBean.inputSave.money.description}" />
                                            </p:selectOneMenu>
                                        </td>
                                    </tr> 
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfMarkInput" value="Marca"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfMarkInput"  value="#{scInputBean.inputSelected.mark}"/>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfSerieInput" value="Serie"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfSerieInput"  value="#{scInputBean.inputSelected.serie}"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbSupplier" value="Proveedor"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbSupplier"  value="#{scInputBean.inputSelected.supplierGuarantee}" style="width: 80%;"
                                                             converter="partnerConverter" converterMessage="Error en el tipo de dato del proveedor y garantía"
                                                             required="true" requiredMessage="Campo obligatorio debe seleccionar un proveedor" effect="puff"
                                                             height="140" disabled="true">
                                                <f:selectItems value="#{scInputBean.partnersList}" var="partners" itemLabel="#{partners.companyName}"/>
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbCostCenter" value="Centro de Costos"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbCostCenter"  value="#{scInputBean.inputSelected.costCenter}" style="width: 80%;" 
                                                             converter="costCenterConverter" converterMessage="Error en el tipo de dato del centro de costos"
                                                             required="true" requiredMessage="Campo obligatorio debe seleccionar un centro de costos" effect="puff"
                                                             height="140" disabled="true">
                                                <f:selectItems  value="#{scInputBean.costCenterList}" var="costCenters" itemLabel="#{costCenters.description}"/>
                                            </p:selectOneMenu>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfStore" value="Almacén"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="tfStore"  value="#{scInputBean.inputSelected.inputStock.idStore}" style="width: 80%;"
                                                             converter="storeConverter" converterMessage="Error en el tipo de dato del almacén"
                                                             required="true" requiredMessage="Campo obligatorio debe seleccionar un almacén" effect="puff"
                                                             height="140" disabled="true">

                                                <f:selectItems value="#{scInputBean.storesList}" var="stores" itemLabel="#{stores.name}"/>e
                                            </p:selectOneMenu>
                                        </td>
                                        
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbLocation" value="Localización"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbLocation"  value="#{scInputBean.inputSelected.inputLocation}" style="width: 80%;" 
                                                             converter="inputLocationConverter" converterMessage="Error en el tipo de dato de la localización del insumo"
                                                             required="true" requiredMessage="Campo obligatorio debe seleccionar una localización" effect="puff"
                                                             height="140" disabled="true">
                                                <f:selectItem itemLabel="..." />
                                                <f:selectItems  value="#{scInputBean.inputLocationsList}" var="inputLocations" itemLabel="#{inputLocations.location}"/>
                                            </p:selectOneMenu>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfProirity" value="Prioridad"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="tfProirity"  value="#{scInputBean.inputSelected.priority}" style="width: 80%;"
                                                             converter="priorityConverter" converterMessage="Error en el tipo de dato de la prioridad"
                                                             required="true" requiredMessage="Campo obligatorio debe seleccionar una prioridad" effect="puff"
                                                             height="140" disabled="true">

                                                <f:selectItems value="#{scInputBean.priorityList}" var="priority" itemLabel="#{priority.name}"/>e
                                            </p:selectOneMenu>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbPackingUnit" value="Unidad de Empaque"/>
                                        </td>
                                        <td width="40%" align="left">

                                            <p:selectOneMenu id="cbPackingUnit"  value="#{scInputBean.inputSelected.packingUnit}" style="width: 80%;" 
                                                             converter="costCenterConverter" converterMessage="Error en el tipo de dato de unidad de empaque"
                                                             required="true" requiredMessage="Campo obligatorio debe seleccionar una unidad de empaque" effect="puff"
                                                             height="140" disabled="true">
                                                <f:selectItems  value="#{scInputBean.packingUnitsList}" var="packingUnit" itemLabel="#{packingUnit.acronym}"/>
                                            </p:selectOneMenu>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfDistributionAmount" value="Cantidad de Distribución*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfDistributionAmount"  value="#{scInputBean.inputSelected.distributionAmount}"
                                                           />
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="cbDistributionUnit" value="Unidad de Distribución*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:selectOneMenu id="cbDistributionUnit"  value="#{scInputBean.inputSelected.distributionUnit}" 
                                                             converter="distributionUnitConverter" converterMessage="Error en el tipo de dato de la unidad de distribución" style="width: 70%; top: 6px;"
                                                             effect="puff"
                                                             height="140" disabled="true">
                                                <f:selectItem itemLabel="..."/>
                                                <f:selectItems value="#{scInputBean.distributionUnitsList}" var="units" itemLabel="#{units.acronym}"/>

                                            </p:selectOneMenu>
                                            <p:spacer width="5px"/>
                                            <p:commandButton  id="btnAddDistributionUnit" icon="ui-icon-circle-plus"  oncomplete="PF('unitDistributionSave').show()" style="top: -2px;"/>
                                            <p:tooltip for="btnAddDistributionUnit" value="Agregue nuevas unidades de distribución"/>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab> 
                        <!--                        finaliza la pestaña para datos generales -->
                        <!--                       inicia la pestaña para el stock y -->
                        <p:tab title="Stock y Dimensiones" id="tabStock" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para el stock">
                            <p:panel header="Stock"  toggleTitle="Presione para minimizar el panel de Stock">
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfMaximeStock" value="Stock Máximo"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:outputLabel    id="tfMaximeStock"  value="#{scInputBean.inputSelected.inputStock.maximeStock}"/>
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfMinimeStock" value="Stock Mínimo"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:outputLabel    id="tfMinimeStock"  value="#{scInputBean.inputSelected.inputStock.minimeStock}"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfCurrentStock" value="Stock Real"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:outputLabel    id="tfCurrentStock"  value="#{scInputBean.inputSelected.inputStock.currentStock}"/>
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfOptimeStock" value="Stock Óptimo"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:outputLabel    id="tfOptimeStock"  value="#{scInputBean.inputSelected.inputStock.optimeStock}"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfPriceUnit" value="Precio por #{scInputBean.inputSelected.packingUnit.acronym}*"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:outputLabel    id="tfPriceUnit"  value="#{scInputBean.inputSelected.inputStock.priceUnit} #{scInputBean.inputSelected.money.acronym}" />
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfValueTotal" value="Valor Total"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:outputLabel    id="tfValueTotal"  value="#{scInputBean.inputSelected.inputStock.totalValue} #{scInputBean.inputSelected.money.acronym}"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfTotalDistributionAmount" 
                                            value="Total de #{scInputBean.inputSelected.distributionUnit.acronym}"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:outputLabel    id="tfTotalDistributionAmount"  value="#{scInputBean.inputSelected.totalAmountDistribution}"
                                                            />
                                        </td>
                                        <td width="20%" align="right">
                                            <p:outputLabel  for="tfUnitPriceDistribution" value="Precio por #{scInputBean.inputSelected.distributionUnit.acronym}"/>
                                        </td>
                                        <td width="30%" align="left">
                                            <p:outputLabel id="tfUnitPriceDistribution"  value="#{scInputBean.inputSelected.distributionValue} #{scInputBean.inputSelected.money.acronym}"
                                                            />
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                            <p:panel header="Dimensiones"  toggleTitle="Presione para minimizar el panel de Dimensiones">

                                <table width="98%" cellspacing="10"  >
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfHigh" value="Altura"/>

                                        </td>
                                        <td width="40%" align="left">

                                            <p:outputLabel    id="tfHigh"  value="#{scInputBean.inputSelected.dimension.hight}"/>


                                        </td> 
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfWidth" value="Ancho"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfWidth"  value="#{scInputBean.inputSelected.dimension.width}"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfLarge" value="Largo"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfLarge"  value="#{scInputBean.inputSelected.dimension.large}"/>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfVolume" value="Volumen"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfVolume"  value="#{scInputBean.inputSelected.dimension.volume}" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfThickness" value="Grosor"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfThickness"  value="#{scInputBean.inputSelected.dimension.thickness}"/>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfRadio" value="Radio"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfRadio"  value="#{scInputBean.inputSelected.dimension.radio}"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfWeight" value="Peso*"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:outputLabel    id="tfWeight"  value="#{scInputBean.inputSelected.dimension.weight}"/>
                                        </td>
                                        <td width="10%" align="right">
                                            <p:outputLabel  for="tfObservationsDimension" value="Observaciones"/>
                                        </td>
                                        <td width="40%" align="left">
                                            <p:inputTextarea   id="tfObservationsDimension"  value="#{scInputBean.inputSelected.dimension.observations}"
                                                               style="width: 98%;"     disabled="true"/>
                                        </td>
                                    </tr>

                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para stock y dimensiones-->
                        <!--                        inicia pestaña para especificaciones-->
                        <p:tab title="Especificaciones" id="tabSpecifications" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para las especificaciones del insumo">
                            <p:panel header="Especificaciones" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableSpecificationSave"
                                                         var="specifications" 
                                                         value="#{scInputBean.inputSelected.scInputSpecifications}"
                                                         rowKey="#{specifications.tittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{specifications.tittle}">

                                                <p:column  headerText="Título" sortBy="#{specifications.tittle}">
                                                    <p:outputLabel value="#{specifications.tittle}" id="outTittle"/>
                                                    <p:tooltip value="#{specifications.tittle}" for="outTittle"/>
                                                </p:column>
                                                <p:column  headerText="Observación" sortBy="#{specifications.description}">
                                                    <p:outputLabel value="#{specifications.description}" id="outDescription"/>
                                                    <p:tooltip value="#{specifications.description}" for="outDescription"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para especificaciones-->
                        <!--                        inicia pestaña para características-->
                        <p:tab title="Características" id="tabFeactures" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para las características del insumo">
                            <p:panel header="Características" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableFeactureSave"
                                                         var="feactures" 
                                                         value="#{scInputBean.inputSelected.scInputFeacturesList}"
                                                         rowKey="#{feactures.tittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{feactures.tittle}">

                                                <p:column  headerText="Título" sortBy="#{feactures.tittle}">
                                                    <p:outputLabel value="#{feactures.tittle}" id="outTittle"/>
                                                    <p:tooltip value="#{feactures.tittle}" for="outTittle"/>
                                                </p:column>
                                                <p:column  headerText="Observación" sortBy="#{feactures.description}">
                                                    <p:outputLabel value="#{feactures.description}" id="outDescription"/>
                                                    <p:tooltip value="#{feactures.description}" for="outDescription"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para características-->
                        <!--                        inicia pestaña para observaciones-->
                        <p:tab title="Observaciones" id="tabObservations" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para las observaciones del insumo">
                            <p:panel header="Observaciones" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableObservationSave"
                                                         var="observation" 
                                                         value="#{scInputBean.inputSelected.scInputObservationsList}"
                                                         rowKey="#{observation.tittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{observation.tittle}">

                                                <p:column  headerText="Título" sortBy="#{observation.tittle}">
                                                    <p:outputLabel value="#{observation.tittle}" id="outTittle"/>
                                                    <p:tooltip value="#{observation.tittle}" for="outTittle"/>
                                                </p:column>
                                                <p:column  headerText="Observación" sortBy="#{observation.description}">
                                                    <p:outputLabel value="#{observation.description}" id="outDescription"/>
                                                    <p:tooltip value="#{observation.description}" for="outDescription"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para observaciones-->
                        <!--                        inicia pestaña para documentos-->
                        <p:tab title="Documentos" id="tabDocuments" titleStyleClass="tabTittleSavePerson" 
                               titletip="Pestaña para los documentos del insumo">
                            <p:panel header="Documentos" >
                                <table width="98%" cellspacing="10" >
                                    <tr>
                                        <td width="60%" align="center" valign="top">
                                            <p:dataTable id="dataTableDocumentationSave"
                                                         var="document" 
                                                         value="#{scInputBean.inputSelected.scInputDocuments}"
                                                         rowKey="#{document.documentTittle}"
                                                         paginator="true" rows="10"  
                                                         pageLinks="40" editable="true"
                                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                                                         {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                         liveResize="true" rowsPerPageTemplate="15,30,50"
                                                         paginatorPosition="top"
                                                         sortBy="#{document.documentTittle}">

                                                <p:column  style="width:32px">
                                                    <p:commandButton icon="ui-icon-arrowthickstop-1-s" update="dataTableDocumentationSave" title="Descargar Documento"
                                                                     process="@this" ajax="false" onstart="start()" oncomplete="stop()"
                                                                     actionListener="#{scInputBean.downloadDocument(document)}" >
                                                    </p:commandButton>
                                                </p:column>
                                                <p:column  headerText="Título" sortBy="#{document.documentTittle}">
                                                    <p:outputLabel value="#{document.documentTittle}" id="outTittle"/>
                                                    <p:tooltip value="#{document.documentTittle}" for="outTittle"/>
                                                </p:column>                                                 
                                                <p:column  headerText="Documento" sortBy="#{document.documentName}">
                                                    <p:outputLabel value="#{document.documentName}" id="documentName"/>
                                                    <p:tooltip value="#{document.documentName}" for="documentName"/>
                                                </p:column>
                                                <p:column  headerText="Fecha de Subida" sortBy="#{scInputBean.getFormatDateGlobal('dd/MM/yyyy hh:mm:ss', document.creationDate)}">
                                                    <p:outputLabel value="#{scInputBean.getFormatDateGlobal('dd/MM/yyyy hh:mm:ss', document.creationDate)}" id="uploadDate"/>
                                                    <p:tooltip value="#{scInputBean.getFormatDateGlobal('dd/MM/yyyy hh:mm:ss', document.creationDate)}" for="uploadDate"/>
                                                </p:column>
                                                <p:column  headerText="Subido por" sortBy="#{document.uploadBy}">
                                                    <p:outputLabel value="#{document.uploadBy}" id="uploadBy"/>
                                                    <p:tooltip value="#{document.uploadBy}" for="uploadBy"/>
                                                </p:column>
                                            </p:dataTable>
                                        </td>
                                    </tr>
                                </table>
                            </p:panel>
                        </p:tab>
                        <!--                        finaliza pestaña para documentos                   -->
                    </p:wizard>
                </h:form>
                <p:ajax event="close" oncomplete="PF('wizardView').loadStep('tabGeneral', false)" />
            </p:dialog>
            <!--################ finaliza el dialogo para visualizar Insumos ######################33-->

            <!--           dialogo para crear un centro de costos-->
            <p:dialog id="centerCostSave" widgetVar="centerCostSave" draggable="true"  
                      closable="true"  header="Agregar un Centro de Costos" position="center top" 
                      hideEffect="explode" modal="true" showEffect="explode" 
                      >
                <h:form id="formCostCenter">
                    <table width="98%" cellspacing="10" >
                        <tr>
                            <td width="20%" align="right">
                                <p:outputLabel  for="tfAreaCostCenter" value="Nombre del Área"/>
                            </td>
                            <td width="80%" align="left">
                                <p:inputText    id="tfAreaCostCenter"  value="#{scInputBean.costCenterSave.description}"
                                                required="true" requiredMessage="Campo obligatorio debe ingresar el área del centro de costos"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right">
                                <p:outputLabel  for="tfcodigoCostCenter" value="Código"/>
                            </td>
                            <td width="80%" align="left">
                                <p:inputText    id="tfcodigoCostCenter"  value="#{scInputBean.costCenterSave.costCenter}"
                                                required="true" requiredMessage="Campo obligatorio debe ingresar el código del centro de costos"/>
                            </td>
                        </tr>
                        <tr>

                            <td  align="center" colspan="2">
                                <p:commandButton value="Guardar" actionListener="#{scInputBean.addCostCenter()}"  
                                                 onsuccess="PF('centerCostSave').hide()"
                                                 update="@this,tfAreaCostCenter,tfcodigoCostCenter,:formWizardSave:cbCostCenter,:formWizardUpdate:cbCostCenter"/>
                                <p:spacer width="20"/>

                                <p:commandButton value="Cancelar" actionListener="#{scInputBean.cleanFieldsCostCenter()}" 
                                                 oncomplete="PF('centerCostSave').hide()"
                                                 update="@this,tfAreaCostCenter,tfcodigoCostCenter"/>
                            </td>
                        </tr>
                    </table> 
                </h:form>
            </p:dialog>
            <!--         fin  dialogo para crear un centro de costos-->
            <!--           dialogo para crear una medida-->
            <p:dialog id="measureSave" widgetVar="measureSave" draggable="true" 
                      closable="true"  header="Agregar una Medida" position="center top" 
                      hideEffect="explode" modal="true" showEffect="explode" 
                      >
                <h:form id="formMeasure">
                    <table width="98%" cellspacing="10" >
                        <tr>
                            <td width="20%" align="right">
                                <p:outputLabel  for="tfAcronym" value="Medida"/>
                            </td>
                            <td width="80%" align="left">
                                <p:inputText    id="tfAcronym"  value="#{scInputBean.measureUnitSave.acronym}"
                                                required="true" requiredMessage="Campo obligatorio debe ingresar la unidad de medida"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right">
                                <p:outputLabel  for="tfTypeMeasure" value="Tipo"/>
                            </td>
                            <td width="80%" align="left">
                                <p:inputText    id="tfTypeMeasure"  value="#{scInputBean.measureUnitSave.type}"
                                                required="true" requiredMessage="Campo obligatorio debe ingresar el tipo de medida"/>
                            </td>
                        </tr>
                        <tr>

                            <td  align="center" colspan="2">
                                <p:commandButton value="Guardar" actionListener="#{scInputBean.addMeasure()}"  
                                                 onsuccess="PF('measureSave').hide()"
                                                 update="@this,tfAcronym,tfTypeMeasure,:formWizardSave:cbMeasureHigh,:formWizardSave:cbMeasureWidth,:formWizardSave:cbMeasureLarge,
                                                 :formWizardSave:cbMeasureVolume,:formWizardSave:cbMeasureThickness,:formWizardSave:cbMeasureRadio,:formWizardSave:cbMeasureWeight
                                                 ,:formWizardUpdate:cbMeasureHigh,:formWizardUpdate:cbMeasureWidth,:formWizardUpdate:cbMeasureLarge,
                                                 :formWizardUpdate:cbMeasureVolume,:formWizardUpdate:cbMeasureThickness,:formWizardUpdate:cbMeasureRadio,
                                                 :formWizardUpdate:cbMeasureWeight"/>
                                <p:spacer width="20"/>

                                <p:commandButton value="Cancelar" actionListener="#{scInputBean.cleanFieldsMeasure()}" 
                                                 oncomplete="PF('measureSave').hide()"
                                                 update="@this,tfAcronym,tfTypeMeasure"/>
                            </td>
                        </tr>
                    </table>
                </h:form>
            </p:dialog>
            <!--         fin  dialogo para crear una medida-->

            <!--           dialogo para crear unidades de empaque-->
            <p:dialog id="unitPackingSave" widgetVar="unitPackingSave" draggable="true" 
                      closable="true"  header="Agregar una Unidad de Empaque" position="center top" 
                      hideEffect="explode" modal="true" showEffect="explode" 
                      >
                <h:form id="formUnitPacking">
                    <table width="98%" cellspacing="10" >
                        <tr>
                            <td width="20%" align="right">
                                <p:outputLabel  for="tfAcronym" value="Abreviatura"/>
                            </td>
                            <td width="80%" align="left">
                                <p:inputText    id="tfAcronym"  value="#{scInputBean.packingUnitSave.acronym}"
                                                required="true" requiredMessage="Campo obligatorio debe ingresar la abreviatura de la unidad de empaque"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right">
                                <p:outputLabel  for="tfDescriptionPacking" value="Descripción"/>
                            </td>
                            <td width="80%" align="left">
                                <p:inputTextarea    id="tfDescriptionPacking"  value="#{scInputBean.packingUnitSave.description}"
                                                    />
                            </td>
                        </tr>
                        <tr>

                            <td align="center" colspan="2">
                                <p:commandButton value="Guardar" actionListener="#{scInputBean.addPackingUnit()}"  
                                                 onsuccess="PF('unitPackingSave').hide()"
                                                 update="@this,tfAcronym,tfDescriptionPacking,:formWizardSave:cbPackingUnit,:formWizardUpdate:cbPackingUnit"/>
                                <p:spacer width="20"/>

                                <p:commandButton value="Cancelar" actionListener="#{scInputBean.cleanFieldsPackingUnit()}" 
                                                 oncomplete="PF('unitPackingSave').hide()"
                                                 update="tfAcronym,tfDescriptionPacking,@this"/>
                            </td>
                        </tr>
                    </table>
                </h:form>
            </p:dialog>
            <!--         fin  dialogo para crear unidades de empaque del insumo-->
            
            <!--           dialogo para crear unidades de empaque-->
            <p:dialog id="unitDistributionSave" widgetVar="unitDistributionSave" draggable="true" 
                      closable="true"  header="Agregar una Unidad de Distribución" position="center top" 
                      hideEffect="explode" modal="true" showEffect="explode" 
                      >
                <h:form id="formUnitDistribution">
                    <table width="98%" cellspacing="10" >
                        <tr>
                            <td width="20%" align="right">
                                <p:outputLabel  for="tfAcronym" value="Abreviatura"/>
                            </td>
                            <td width="80%" align="left">
                                <p:inputText    id="tfAcronym"  value="#{scInputBean.distributionUnitSave.acronym}"
                                                required="true" requiredMessage="Campo obligatorio debe ingresar la abreviatura de la unidad de distribución"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right">
                                <p:outputLabel  for="tfDescriptionDistribution" value="Descripción"/>
                            </td>
                            <td width="80%" align="left">
                                <p:inputTextarea    id="tfDescriptionDistribution"  value="#{scInputBean.distributionUnitSave.description}"
                                                    />
                            </td>
                        </tr>
                        <tr>

                            <td align="center" colspan="2">
                                <p:commandButton value="Guardar" actionListener="#{scInputBean.addDistributionUnit()}"  
                                                 onsuccess="PF('unitDistributionSave').hide()"
                                                 update="@this,tfAcronym,tfDescriptionDistribution,:formWizardSave:cbDistributionUnit,:formWizardUpdate:cbDistributionUnit"/>
                                <p:spacer width="20"/>

                                <p:commandButton value="Cancelar" actionListener="#{scInputBean.cleanFieldsDistribution()}" 
                                                 oncomplete="PF('unitDistributionSave').hide()"
                                                 update="tfAcronym,tfDescriptionDistribution,@this"/>
                            </td>
                        </tr>
                    </table>
                </h:form>
            </p:dialog>
            <!--         fin  dialogo para crear unidades de empaque del insumo-->
            <!--           dialogo para crear localizaciones-->
            <p:dialog id="inputLocationSave" widgetVar="inputLocationSave" draggable="true" 
                      closable="true"  header="Agregar una Localización del Insumo" position="center top" 
                      hideEffect="explode" modal="true" showEffect="explode" 
                      >
                <h:form id="formInputLocation">
                    <table width="98%" cellspacing="10" >
                        <tr>
                            <td width="20%" align="right">
                                <p:outputLabel  for="tfLocation" value="Localización"/>
                            </td>
                            <td width="80%" align="left">
                                <p:inputText    id="tfLocation"  value="#{scInputBean.inputLocationSave.location}"
                                                required="true" requiredMessage="Campo obligatorio debe ingresar la localización del insumo"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right">
                                <p:outputLabel  for="tfDescriptionLocation" value="Descripción"/>
                            </td>
                            <td width="80%" align="left">
                                <p:inputTextarea    id="tfDescriptionLocation"  value="#{scInputBean.inputLocationSave.description}"
                                                    />
                            </td>
                        </tr>
                        <tr>



                            <td  align="center" colspan="2">
                                <p:commandButton value="Guardar" actionListener="#{scInputBean.addInputLocations()}"  
                                                 onsuccess="PF('inputLocationSave').hide()"
                                                 update="@this,tfDescriptionLocation,tfLocation,:formWizardSave:cbLocation,:formWizardUpdate:cbLocation"/>
                                <p:spacer width="20"/>

                                <p:commandButton value="Cancelar" actionListener="#{scInputBean.cleanFieldsLocationInput()}" 
                                                 oncomplete="PF('inputLocationSave').hide()"
                                                 update="tfDescriptionLocation,tfLocation,@this"/>
                            </td>
                        </tr>
                    </table>
                </h:form>
            </p:dialog>
            <!--         fin  dialogo para crear localizaciones del insumo-->
            <!--            Dialogo para subir imagenes width="10%" align="right" -->
            <p:dialog id="pictureSave" widgetVar="pictureSave" draggable="true" 
                      closable="true"  header="Cargar Imagen..." position="center top" 
                      hideEffect="explode" modal="true" showEffect="explode" 
                      >

                <h:form enctype="multipart/form-data" prependId="false">
                    <p:panelGrid columns="2" style="border: 0px solid; text-align: center;">
                        <p:fileUpload label="Imagen del Insumo" value="#{scInputBean.pictureFile}" mode="simple"
                                      >       >        
                        </p:fileUpload>

                        <p:commandButton id="btnLoadDocument" value="Cargar" icon="ui-icon-circle-arrow-s"
                                         actionListener="#{scInputBean.handleFileUpload(1)}" ajax="false" ignoreAutoUpdate="true"/>
                    </p:panelGrid>
                </h:form>
            </p:dialog>
            <!--            finaliza el dialogo para subir imagenes-->
            <!--            Dialogo para actualizar imagenes width="10%" align="right" -->
            <p:dialog id="pictureUpdate" widgetVar="pictureUpdate" draggable="true" 
                      closable="true"  header="Cargar Imagen..." position="center top" 
                      hideEffect="explode" modal="true" showEffect="explode" 
                      >

                <h:form enctype="multipart/form-data" prependId="false">
                    <p:panelGrid columns="2" style="border: 0px solid; text-align: center;">
                        <p:fileUpload label="Imagen del Insumo" value="#{scInputBean.pictureFile}" mode="simple"
                                      >       >        
                        </p:fileUpload>

                        <p:commandButton id="btnLoadDocumentUpdate" value="Cargar" icon="ui-icon-circle-arrow-s"
                                         actionListener="#{scInputBean.handleFileUpload(2)}" ajax="false" ignoreAutoUpdate="true" />
                    </p:panelGrid>
                </h:form>
            </p:dialog>
            <!--            finaliza el dialogo para actualizar imagenes-->

            <!--            Dialogo para subir documentos width="10%" align="right" -->
            <p:dialog id="documentSave" widgetVar="documentSave" draggable="true" 
                      closable="true"  header="Cargar Documento..." position="center top" 
                      hideEffect="explode" modal="true" showEffect="explode" 
                      >

                <h:form enctype="multipart/form-data" prependId="false">
                    <p:panelGrid columns="2" style="border: 0px solid; text-align: center;">
                        <p:outputLabel for="tfDocument" value="Título del Documento"/>

                        <p:inputText value="#{scInputBean.documentsSave.documentTittle}" id="tfDocument"/> 

                        <p:fileUpload label="Documento de un Insumo" value="#{scInputBean.fileSave}" mode="simple"
                                      update=":formWizardSave:dataTableDocumentationSave">  
                        </p:fileUpload>

                        <p:commandButton id="btnLoadFile" value="Cargar" icon="ui-icon-circle-arrow-s" 
                                         actionListener="#{scInputBean.handleDocumentUpload(1)}" ajax="false" 
                                         update=":formWizardSave:dataTableDocumentationSave"/>
                    </p:panelGrid>
                </h:form>
            </p:dialog>
            <!--            finaliza el dialogo para subir documentos-->

            <!--            Dialogo para subir actualizar -->
            <p:dialog id="documentUpdate" widgetVar="documentUpdate" draggable="true" 
                      closable="true"  header="Actualizar Documento..." position="center top" 
                      hideEffect="explode" modal="true" showEffect="explode" 
                      >

                <h:form enctype="multipart/form-data" prependId="false">
                    <p:panelGrid columns="2" style="border: 0px solid; text-align: center;">
                        <p:outputLabel for="tfDocumentUpdate" value="Título del Documento"/>

                        <p:inputText value="#{scInputBean.documentsSave.documentTittle}" id="tfDocumentUpdate"/> 

                        <p:fileUpload label="Documento de un Insumo" value="#{scInputBean.fileSave}" mode="simple"
                                      update=":formWizardUpdate:dataTableDocumentationSave">  
                        </p:fileUpload>

                        <p:commandButton id="btnLoadFileUpdate" value="Cargar" icon="ui-icon-circle-arrow-s" 
                                         actionListener="#{scInputBean.handleDocumentUpload(2)}" ajax="false" 
                                         update=":formWizardUpdate:dataTableDocumentationSave"/>
                    </p:panelGrid>
                </h:form>
            </p:dialog>
            <!--            finaliza el dialogo para actualizar documentos-->
            
            
<!--            ######################################################################-->
            
        
            <h:form id="formInput">
                <p:remoteCommand name="inputInit" update=":formInput:scDataTableInputs" />
                <p:dataTable id="scDataTableInputs" draggableColumns="true" emptyMessage="No existe información para visualizar" 
                             value="#{scInputBean.inputList}" var="input"
                             paginator="true" rows="10"  
                             pageLinks="40"
                             paginatorTemplate="{CurrentPageReport}  {FirstPageLink} 
                             {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                             rowKey="#{input.idInput}"
                             resizableColumns="true" 
                             liveResize="true" rowsPerPageTemplate="10,20,30" 
                             selectionMode="single" paginatorPosition="top" selection="#{scInputBean.inputSelected}"
                             sortBy="#{input.idInput}"
                             >
                    <f:facet name="header">
                        <p:commandButton icon="ui-icon-plus" id="btnAdd" style="float: right;"  
                                         oncomplete="PF('dialogInputSave').show()">
                            <p:tooltip for="btnAdd" value="Agregar un Insumo"/>
                        </p:commandButton>
                    </f:facet>
                    
                    <p:column filterMatchMode="contains"  filterBy="#{input.description}" headerText="Insumo" sortBy="#{input.description}" id="columnInputName">    
                        <center>
                            <p:outputLabel value="#{input.description}" id="lblIntputName"/>
                            <p:tooltip for="lblIntputName" value="#{input.description}"/>
                        </center>
                    </p:column>
                    <p:column filterMatchMode="contains"  filterBy="#{input.mark}" id="columnMark" headerText="Marca" sortBy="#{input.mark}">    
                        <center>
                            <p:outputLabel value="#{input.mark}" id="lblMark"/>
                            <p:tooltip for="lblMark" value="#{input.mark}"/>
                        </center>
                    </p:column>
                    <p:column filterMatchMode="contains"  filterBy="#{input.serie}" id="columnSerie" headerText="Serie" sortBy="#{input.serie}">    
                        <center>
                            <p:outputLabel value="#{input.serie}" id="lblSerie"/>
                            <p:tooltip for="lblSerie" value="#{input.serie}"/>
                        </center>
                    </p:column>
                    <p:column filterMatchMode="contains"  filterBy="#{input.inputStock.idStore.name}" id="columnStore" headerText="Almacen" sortBy="#{input.inputStock.idStore.name}">    
                        <center>
                            <p:outputLabel value="#{input.inputStock.idStore.name}" id="lblStore"/>
                            <p:tooltip for="lblStore" value="#{input.inputStock.idStore.name}"/>
                        </center>
                    </p:column>
                    <p:column filterMatchMode="contains"  filterBy="#{input.inputLocation.location}" id="columnLocation" headerText="Localización" sortBy="#{input.inputLocation.location}">    
                        <center>
                            <p:outputLabel value="#{input.inputLocation.location}" id="lblLocation"/>
                            <p:tooltip for="lblLocation" value="#{input.inputLocation.location}"/>
                        </center>
                    </p:column>
                    <p:column filterMatchMode="contains"  filterBy="#{input.inputStock.currentStock}" id="columnAmount" headerText="Existencias" sortBy="#{input.inputStock.currentStock}">    
                        <center>
                            <p:outputLabel value="#{input.inputStock.currentStock}" id="lblamount"/>
                            <p:tooltip for="lblamount" value="#{input.inputStock.currentStock}"/>
                        </center>
                    </p:column>

                    <p:column filterMatchMode="contains"  filterBy="#{input.packingUnit.acronym}" id="columPackingUnit" headerText="Und. Empaque" sortBy="#{input.packingUnit}">    
                        <center>
                            <p:outputLabel value="#{input.packingUnit.acronym}" id="lblPackingUnit"/>
                            <p:tooltip for="lblPackingUnit" value="#{input.packingUnit.acronym}"/>
                        </center>
                    </p:column>

                    <p:column filterMatchMode="contains"  filterBy="#{input.value} #{input.money.acronym}" id="columnValue" headerText="Valor" sortBy="#{input.value}">    
                        <center>
                            <p:outputLabel value="#{input.value} #{input.money.acronym}" id="lblValue"/>
                            <p:tooltip for="lblValue" value="#{input.value} #{input.money.acronym}"/>
                        </center>
                    </p:column>
                    <p:column headerText="Admin" width="100">
                        <center>
                            <p:commandButton icon="ui-icon-search" id="btnSearch" update=":formWizardView:"
                            actionListener="#{scInputBean.selectedForView(input)}"
                            oncomplete="PF('dialogInputView').show()">
                                <p:tooltip for="btnSearch" value="Visualizar un Insumo"/>
                            </p:commandButton>
                            <p:spacer width="3"/>
                            <p:commandButton icon="ui-icon-pencil" id="btnEdit" actionListener="#{scInputBean.selectedForUpdate(input)}"
                                             oncomplete="PF('dialogInputUpdate').show()" update=":formWizardUpdate:" 
                                             >
                                <p:tooltip for="btnEdit" value="Editar un Insumo"/>
                            </p:commandButton>
                            <p:spacer width="3"/>
                            <p:commandButton icon="ui-icon-close" id="btnDelete" oncomplete="PF('dialogInputDelete').show()"
                                             actionListener="#{scInputBean.selectedForDelete(input)}" update=":formWizardDelete">
                                <p:tooltip for="btnDelete" value="Eliminar un Insumo"/>
                            </p:commandButton>
                        </center>
                    </p:column>
                </p:dataTable>
            </h:form>
        </div>
    </h:body>
</html>

